/** 
* All Rights Reserved , Copyright (C) 2023 , 青岛鼎信通讯股份有限公司
* 
* MpmProjectTaskHistoryServiceAuto
* 项目任务历史表
* 
* 修改纪录
* 2023-02-10 版本：1.0 houyuhang 创建。
* @version 版本：1.0
* @author 作者：houyuhang
* 创建日期：2023-02-10
*/

package com.topscomm.mpm.service.impl.auto;

import javax.annotation.Resource;
import com.topscomm.basic.IBasicDao;
import com.topscomm.tap.common.DatacodeCache;
import java.util.Map;
import com.topscomm.mpm.*;
import com.topscomm.mpm.pojo.MpmProjectTaskHistoryEntity;
import com.topscomm.mpm.dao.IMpmProjectTaskHistoryDao;


public class MpmProjectTaskHistoryServiceAuto extends MpmService<MpmProjectTaskHistoryEntity,IMpmProjectTaskHistoryDao> {
	
	/**
	 * @author: houyuhang
	 * @date: 2023-02-10
	 * @param mapRow
	 * @description:设置字段显示值
	 * @modify:
	 */
	@Override
	public void setDispFields(Map<String, Object> mapRow, DatacodeCache datacodeCache) {
		String temp;
		if (mapRow.get("flowid") != null) {
			temp = mapRow.get("flowid").toString();
			mapRow.put("dispflowid", datacodeCache.getValueDynamic("ApprovalFlow_MpmProjectTask", temp, "id", "name"));
		}
		if (mapRow.get("state") != null) {
			temp = mapRow.get("state").toString();
			mapRow.put("dispstate", datacodeCache.getValueDynamic("TapApprovalBillState", temp, "code", "name"));
		}
		if (mapRow.get("enabled") != null) {
			temp = mapRow.get("enabled").toString();
			mapRow.put("dispenabled", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
		if (mapRow.get("customerapproval") != null) {
			temp = mapRow.get("customerapproval").toString();
			mapRow.put("dispcustomerapproval", datacodeCache.getValueDynamic("MpmCustomerApproval", temp, "code", "name"));
		}
		if (mapRow.get("needsupport") != null) {
			temp = mapRow.get("needsupport").toString();
			mapRow.put("dispneedsupport", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
		if (mapRow.get("copyedit") != null) {
			temp = mapRow.get("copyedit").toString();
			mapRow.put("dispcopyedit", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
		if (mapRow.get("taskupdatefre") != null) {
			temp = mapRow.get("taskupdatefre").toString();
			mapRow.put("disptaskupdatefre", datacodeCache.getValueDynamic("MpmTaskUpdateFre", temp, "code", "name"));
		}
		if (mapRow.get("havenamelist") != null) {
			temp = mapRow.get("havenamelist").toString();
			mapRow.put("disphavenamelist", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
		if (mapRow.get("intonamelist") != null) {
			temp = mapRow.get("intonamelist").toString();
			mapRow.put("dispintonamelist", datacodeCache.getValueDynamic("MpmIntoNameList", temp, "code", "name"));
		}
		if (mapRow.get("reviewmeetname") != null) {
			temp = mapRow.get("reviewmeetname").toString();
			mapRow.put("dispreviewmeetname", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
		if (mapRow.get("reviewmeetingdocument") != null) {
			temp = mapRow.get("reviewmeetingdocument").toString();
			mapRow.put("dispreviewmeetingdocument", datacodeCache.getValueDynamic("ReviewMeetingDocument", temp, "code", "name"));
		}
	}

	@Override
	@Resource(name = "mpmProjectTaskHistoryDao")
	public void setDao(IBasicDao<MpmProjectTaskHistoryEntity> dao) {		
		super.setDao(dao);
	}
}
